package com.dhecp.project.logstics.mapper;

import com.dhecp.core.genericDao.GenericDao;
import com.dhecp.project.business.domain.FbaShipmentDetail;
import com.dhecp.project.common.domain.UpdateFlow;
import com.dhecp.project.logstics.domain.FbaDispatch;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * DAO
 * @author Jason
 */
public interface FbaDispatchMapper extends GenericDao<FbaDispatch, String>  {

	/**
     * 查询实体
     * @author Jason
	 */
	List<FbaDispatch> findFbaDispatch(Map<String, Object> params);

	/**
     * 查询单个实体
     * @author Jason
	 */
	FbaDispatch queryFirstByGuid(@Param("guid") String guid);
	
	/**
	 * 新增实体
     * @author Jason
	 */
	int insertFbaDispatch(FbaDispatch entity);
	
	/**
	 * 通过guid修改实体
     * @author Jason
	 */
	int updateByGuid(FbaDispatch entity);

	/**
	 *@Description: 修改流程状态及生效标志（仅需 guid、activeFlow、effectStock、updateTime）
	 *@Param: [updateFlow]
	 *@return: int
	 *@Author: hlf
	 *@date: 2022-05-09 10:13
	 */
	int updateFlow(UpdateFlow updateFlow);

	int update(UpdateFlow updateFlow);

	/**
	 * 根据code 删除发货单
	 * @param fbaDispatch
	 * @return
	 */
	int deleteCode(FbaDispatch fbaDispatch);

}
